package org.firebug.generator.micro.controller.web;

import org.firebug.generator.client.feign.SnowflakeFeign;
import org.firebug.generator.micro.service.impl.SnowflakeService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class SnowflakeController implements SnowflakeFeign {
    @Resource
    private SnowflakeService snowflakeService;

    @Override
    public long get() {
        return snowflakeService.get();
    }

    @Override
    public List<Long> get(@PathVariable("count") int count) {
        return snowflakeService.get(count);
    }
}
